package org.colcon.web.model;

import java.util.HashMap;
import java.util.Map;

import org.colcon.web.model.framework.IDecision;

public class Decision extends Item implements IDecision
{
	private static final long serialVersionUID = -5104813606904732705L;
	
	public static final String
	
		// arguments
		GROUP = "group",
		CMD = "cmd";
	
	private String group, cmd;
	
	public Decision()
	{
		this(new HashMap<String, String>());
	}
	
	public Decision(Map<String, String> args)
	{
		this(args.get(GROUP), args.get(CMD));
	}
	
	public Decision(String group, String cmd)
	{
		this.group = group;
		this.cmd = cmd;
	}
	
	public String getGroup()
	{
		return group;
	}
	
	public String getCmd()
	{
		return cmd;
	}
	
	public String getText()
	{
		return group + " > " + getCmd();
	}
}
